#include "Base.h"
#include "2DTexture.h"



C2DTexture::~C2DTexture()
{
	//Unload();
}

bool C2DTexture::LoadFile()
{
	if(D3DXCreateTextureFromFile(CORE->GetGraphicsManager()->GetDevice(), m_FileName.c_str(), &m_Texture)==D3D_OK) return true;
	return false;
}

void C2DTexture::Activate(size_t StageId)
{
	CORE->GetGraphicsManager()->GetDevice()->SetTexture(StageId, m_Texture);
}

void C2DTexture::Unload()
{
	CHECKED_RELEASE(m_Texture);
	
}


